import { IRouteComponentProps } from "umi";
// import BaseTabBar from "@/components/layout/baseTabBar";//tabbar布局组件
import React from "react"
export default function({children,location}:IRouteComponentProps){
   console.log(location);
   if(location.pathname==="/mine"){
    return children
   }else{
        return(
            <div>
                <h1>布局组件</h1>
                {children}
            </div>
    )
   }
}

//比如:Cart Login Product Users不需要布局
// Mine OrderList Home这三个页面需要布局
// let layoutPage:Array<string> =["/mine","/orderlist","/home"]
// export default function({children,location}:IRouteComponentProps){
//     let isLayoutPage:boolean = layoutPage.includes(location.pathname)
//     if(isLayoutPage){
//         return(
//             <BaseTabBar>
//                 {children}
//             </BaseTabBar>
//         )
//     }
//     return children
//  }
